Skip to content

Conversation

@isaachilly
Copy link
Collaborator

@isaachilly isaachilly commented Jan 21, 2026

I have a JIRA ticket

  • branch and/or PR name(s) include(s) JIRA ID
  • issue has "Fix version" assigned
  • issue "Status" is set to "In review"
  • PR labels are selected

Notable changes for users:

  • Can now use ranges in runNumber filter on the envs table page

Notable changes for developers:

  • N/A

Changes made to the database:

  • N/A

Consolidated multiple granular filtering tests into one comprehensive test that applies all filters in sequence.

This streamlines the test suite.
Updated GetAllEnvironmentsDto and GetAllEnvironmentsUseCase to support runNumbers filtering using ranges.

Added range to large filter test case.
Refactored range validation logic to use a custom error code (RANGE_INVALID) and improved error messages for invalid input formats in DTOs.

Enhanced rangeUtils to handle empty values, multiple dashes, and non-numeric input more robustly.

Updated related tests and API validation to reflect new error handling and messaging.
@isaachilly isaachilly added frontend backend javascript Pull requests that update Javascript code labels Jan 21, 2026
@codecov
Copy link

codecov bot commented Jan 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 45.69%. Comparing base (7f6dbfd) to head (3ee8f43).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2062      +/-   ##
==========================================
+ Coverage   45.68%   45.69%   +0.01%     
==========================================
  Files        1031     1031              
  Lines       17206    17208       +2     
  Branches     3134     3131       -3     
==========================================
+ Hits         7861     7864       +3     
+ Misses       9345     9344       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Removed strict rejection of empty entries in run number filters, allowing filters like '103,,' to be processed.

Added comprehensive tests for valid and invalid run number ranges, including edge cases with empty entries and invalid formats, to ensure correct API and use case behaviour.
Updated validateRange to skip non-numeric inputs instead of returning an error.
Update validateRange to return an error on invalid numbers instead of continuing.

Adjust test to remove non-numeric run number from input, reflecting stricter validation.
@isaachilly isaachilly changed the title Improv/o2 b 1520/add filtering by run intervals to envs [O2B-1520] Add filtering by run intervals to envs Jan 27, 2026
Simplified the range validation logic in rangeUtils.js by removing redundant checks and revert to using parseInt for number parsing.

Revert test too.
Previous rangeUtils would not allow negative number due to parseInt converting "" from the split to NaN but with Number this gets converted to 0 making a valid range.

Removing tests for dashes, this is a good test however was deemed things could be relying on the api allowing input such as 1-2-3 even if incorrect.
@isaachilly isaachilly self-assigned this Jan 27, 2026
@isaachilly isaachilly marked this pull request as ready for review January 27, 2026 15:54
@isaachilly isaachilly requested a review from graduta as a code owner January 27, 2026 15:54
@isaachilly isaachilly merged commit f3001be into main Jan 27, 2026
24 checks passed
@isaachilly isaachilly deleted the improv/O2B-1520/Add-filtering-by-run-intervals-to-envs branch January 27, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend frontend javascript Pull requests that update Javascript code

Development

Successfully merging this pull request may close these issues.

3 participants